package interfaces;

import domain.users.User;

public interface UserRepository {

/**
 * checks whether user exists in the repository.
 * @param username
 * @param password
 * @return
 */
	boolean authenticate(String username, String password);

/**
 * adds a new user to the repository.
 * @param username
 * @param password
 * @return
 */
	boolean addUser(String username, String email, String password);

/**
 * removes a user from the repository
 * @param username
 * @return
 */
	boolean removeUser(String username);


/**
 * persistence layer should support the option to retrieve a User object by name
 * @param username
 * @return
 */
	User getUser(String username);

/**
 * checks for a user in the repository.
 * @param username
 * @return
 */
	public boolean exists(String username);


	public boolean changeRank(String username, int type);


	public boolean updateUser(String username, String newEmail, String oldPass, String newPass);
}
